Problem: A truncated cone has horizontal bases with radii 18 and 2. A sphere is tangent to the top, bottom, and lateral surface of the truncated cone. What is the radius of the sphere?
Solution: Let $\overline{AB}$ and $\overline{DC}$ be parallel diameters of the bottom and top bases, respectively. A great circle of the sphere is tangent to all four sides of trapezoid $ABCD$. Let $E,F$, and $G$ be the points of tangency on $\overline{AB}$, $\overline{BC}$, and $\overline{CD}$, respectively. Then \[
FB= EB= 18 \quad\text{and}\quad FC= GC= 2,
\]so $BC=20$. If $H$ is on $\overline{AB}$ such that $\angle CHB$ is a right angle, then $HB= 18-2=16.$ Thus \[
CH=\sqrt{20^{2}-16^{2}}=12,
\]and the radius of the sphere is $(1/2)(12)=\boxed{6}$.

[asy]
unitsize(0.2cm);
pair A,B,C,D,I,F,G,H;
A=(0,0);
B=(36,0);
I=(18,0);
H=(20,0);
D=(16,12);
C=(20,12);
G=(18,12);
F=(21.6,10.8);
dot(F);
dot(I);
dot(G);
draw(Circle((18,6),6),linewidth(0.7));
draw(A--B--C--D--cycle,linewidth(0.7));
draw(G--I,linewidth(0.7));
draw(C--H,linewidth(0.7));
label("2",(19,12),N);
draw((20,-2)--(36,-2));
draw((18,-4)--(36,-4));
draw((20,-2.5)--(20,-1.5));
draw((36,-2.5)--(36,-1.5));
draw((18,-3.5)--(18,-4.5));
draw((36,-3.5)--(36,-4.5));
label("{\tiny 16}",(28,-2),S);
label("{\tiny 18}",(27,-4),S);
label("12",(20,6),E);
label("$E$",I,S);
label("{\tiny $H$}",H,SE);
label("$B$",B,SE);
label("$F$",F,NE);
label("$C$",C,NE);
label("$G$",G,SW);
label("$D$",D,NW);
label("$A$",A,S);
[/asy]